package com.yunwushanhe.document.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yunwushanhe.document.entity.File;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunwushanhe.document.utils.PageUtils;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 云雾山河
 * @since 2022-10-24
 */
public interface IFileService extends IService<File> {
    int insert(File file);//已查看
    int deleteById(int id);//已查看
    int deleteFolderContentsVague(String filePath,String fileOfUserNumber);//已改
    int updateFilename(File file,String fileOfUserNumber);//已改
    List<File> select(String filePath,String filename,String fileOfUserNumber);//已改
    File selectByFilePathAndFilename(String filePath,String filename,String fileOfUserNumber);//新增，用于覆盖文件时使用
    File selectById(int id);//已查看
    File renameSelect(int id);//已查看
    IPage<File> getPage(int currentPage, int pageSize);
    IPage<File> getPage(int currentPage,int pageSize,File file);
    List<File> queryVagueByFilePath(String filePath,String fileOfUserNumber);//已改
    PageUtils getFilePage(int currentPage, int pageSize, String filePath,String fileOfUserNumber);//已改
    PageUtils getFilePageTwo(int currentPage, int pageSize, String filePath,String fileOfUserNumber);//已改
    PageUtils getFilePageVague(int currentPage, int pageSize, String filename,String fileOfUserNumber);//已改

    void copyOrRemoveInsert(File copyOrRemoveFile,File targetFile,List<File> fileList);
}
